<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Canvas元素完整功能示例</title>
    <style>
        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }


        .content {
           display: flex;
          justify-content: center; /* 水平居中 */
          align-items: center;     /* 垂直居中 */
          height: 100vh;           /* 占满整个视口高度 */
        }
        .container {
            max-width: 1200px;
            margin: 0 auto;
            border-radius: 15px;
            padding: 30px;
        }

        header {
            text-align: center;
            margin-bottom: 40px;
            padding: 20px;
            background: linear-gradient(to right, #3494e6, #ec6ead);
            border-radius: 10px;
            color: white;
        }

        h1 {
            font-size: 2.8rem;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        }

        h2 {
            font-size: 1.8rem;
            margin: 25px 0 15px;
            color: #2c3e50;
            padding-bottom: 8px;
            border-bottom: 2px solid #3498db;
        }

        .tag-section {
            margin-bottom: 30px;
            padding: 20px;
            border-radius: 10px;
            background: #f8f9fa;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
            transition: transform 0.3s ease;
        }

        .tag-section:hover {
            transform: translateY(-5px);
        }

        .tag-name {
            font-size: 1.5rem;
            color: #e74c3c;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
        }

        .tag-name::before {
            content: "<";
            color: #2c3e50;
            margin-right: 5px;
        }

        .tag-name::after {
            content: ">";
            color: #2c3e50;
            margin-left: 5px;
        }

        .description {
            color: #7f8c8d;
            margin-bottom: 15px;
            font-style: italic;
        }

        .canvas-container {
            margin: 15px 0;
            padding: 15px;
            background: white;
            border-radius: 8px;
            box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
            text-align: center;
        }

        canvas {
            display: inline-block;
            background: #ecf0f1;
            border-radius: 5px;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
            margin: 10px;
        }

        table {
            width: 100%;
            border-collapse: collapse;
            margin: 15px 0;
        }

        td {
            padding: 10px;
            border: 1px solid #bdc3c7;
            text-align: center;
        }

        ul {
            list-style-type: none;
            padding: 15px;
            background: white;
            border-radius: 8px;
            box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
        }

        li {
            padding: 10px;
            margin: 10px 0;
            background: #ecf0f1;
            border-radius: 5px;
        }

        form {
            padding: 15px;
            background: white;
            border-radius: 8px;
            box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
        }

        .form-group {
            margin: 15px 0;
        }

        label {
            display: block;
            margin-bottom: 5px;
            color: #2c3e50;
        }

        input, textarea {
            width: 100%;
            padding: 10px;
            border: 1px solid #bdc3c7;
            border-radius: 5px;
        }

        button {
            background: #3498db;
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 5px;
            cursor: pointer;
            font-size: 1rem;
            transition: background 0.3s ease;
        }

        button:hover {
            background: #2980b9;
        }

        footer {
            text-align: center;
            margin-top: 40px;
            padding: 20px;
            color: #7f8c8d;
            font-size: 0.9rem;
            border-top: 1px solid #bdc3c7;
        }

        @media (max-width: 768px) {
            .container {
                padding: 15px;
            }

            h1 {
                font-size: 2rem;
            }

            h2 {
                font-size: 1.5rem;
            }
        }
    </style>
</head>
<body>
<div class="content">

<div class="container">

    <section class="tag-section">
        <h2 class="tag-name">li标签</h2>
        <p class="description">列表项中可以包含Canvas元素</p>
        <ul>
            <li>
                <h4>项目进度</h4>
                <canvas id="liCanvas1" width="250" height="80"></canvas>
                <p>已完成75%</p>
            </li>
            <li>
                <h4>资源使用情况</h4>
                <canvas id="liCanvas2" width="250" height="80"></canvas>
                <p>CPU使用率: 45%</p>
            </li>
        </ul>
    </section>
</div>

</div>
</body>
</html>


